
var TransactionController = function($scope, $http){

	$http.defaults.headers.post["Content-Type"] = "application/json";
	var urlBase="http://localhost:8080/project";
	
	$scope.getListTransaction = function(){
		$http.get(urlBase + '/transaction/getList').success(function(respone){
			$scope.listTransaction = respone;
		}).error(function(){
			alert("error");
		});
	}
	
	
	$scope.reportSuccess = function(id){
		$http.post(urlBase + '/transaction/update/' + id). success(function(respone){
			$scope.getListTransaction();
		}).error(function(){
			alert("error report");
		});
	}
	
	$scope.getListTransaction();
}